package cn.tedu._04mvc.controller;

import cn.tedu._04mvc.pojo.dto.AddCarDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CarController {
    @RequestMapping("v1/cars/add")
    @ResponseBody
    public String add(String brand,String license,Double price){
        System.out.println(brand+":"+license+":"+price);
        return "添加成功";
    }

    @RequestMapping("v1/cars/add2")
    @ResponseBody
    public String add2(AddCarDTO addCarDTO){
        System.out.println(addCarDTO);
        return "添加成功";
    }
}
